<!-- BLOCK TIN TỨC NỔI BẬT -->
<?php
	$sql = "SELECT * FROM news ORDER BY id DESC LIMIT 3";
	$connection = yii::app()->db;
	$command = $connection->createCommand($sql);
	$result =  $command->queryAll();
?>
<div class="block block-file block-breaking-news">
	<h2 class="title title-bd"><a href="<?php echo PIUrl::createUrl('/home/news');?>"><?php echo translate("Tin tức nổi bật"); ?></a></h2>
	<?php if(!empty($result)){ ?>
		<ul class="md">
			<?php  foreach($result as $row){ ?>
				<li>
					<div class="img-liquid">
						<a href="<?php echo PIUrl::createUrl('/home/newsDetail/', array('alias' => $row['alias']));?>"><img src="<?php echo getImage($row['image'], 170, 78); ?>" alt="<?php echo $row['name']; ?>" width="170" height="78" /></a>
					</div>
					<div class="content-left">
						<h3 title="<?php echo $row['name']; ?>" class="title-sm"><a href="<?php echo PIUrl::createUrl('/home/newsDetail/', array('alias' => $row['alias']));?>"><?php echo $this->word_limiter($row['name'], 10); ?></a></h3>
						<p class="date-post"><?php echo "Đăng ngày ".date("d/m/Y",$row['created']); ?></p>
					</div>
				</li>
			<?php } ?>
		</ul>
	<?php } ?>
</div>